#include "BPlusTreeC.h"
#include <string.h>
using namespace BPlusTreeNS;

sysIndex *propertyObj;

BPlusTreeC* myBPTObj;

void TEST1_initializeBPlusTree()
{
propertyObj->indexID = 111;
propertyObj->isAsc = 1;
propertyObj->tableID = 11;
propertyObj->ptrToPageContainingRootofTree = 5;
//propertyObj->fanoutFactor =

strcpy(propertyObj->compositeKeyParts[0].attributeName,"RollNo");
strcpy(propertyObj->compositeKeyParts[0].attributeType,"INTEGER");
propertyObj->compositeKeyParts[0].attributeSize = 4; //bytes

strcpy(propertyObj->compositeKeyParts[1].attributeName,"Name");
strcpy(propertyObj->compositeKeyParts[1].attributeType,"VARCHAR");
propertyObj->compositeKeyParts[1].attributeSize = 1000; //bytes

myBPTObj->setAttributeCount(2);

myBPTObj->initBPlusTree();

}

void TEST2_createInternalNode()
{
	internalNode *n1, *n2, *n3, *n4;
	myBPTObj->createInternalNode(&n1);
	myBPTObj->createInternalNode(&n2);
	myBPTObj->createInternalNode(&n3);
	myBPTObj->createInternalNode(&n4);
}

int main()
		{
			propertyObj = (sysIndex*) malloc (sizeof(sysIndex));
			myBPTObj = new BPlusTreeC;
			TEST1_initializeBPlusTree ();
		//	TEST2_createInternalNode();
			return 0;
		}
